package Java测试.编码1copycopy;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        Worket worket1 = new Worket("李四", 34, 3000);
        Worket worket2 = new Worket("王五", 53, 5200);
        Worket worket3 = new Worket("张三", 34, 5200);
        Worket worket4 = new Worket("赵六", 23, 8000);
        Worket worket5 = new Worket("大傻", 52, 6500);
        ArrayList<Worket> workets = new ArrayList<>();
        workets.add(worket1);
        workets.add(worket2);
        workets.add(worket3);
        workets.add(worket4);
        workets.add(worket5);
        for (Worket worket : workets) {
            System.out.println(worket.getName()+":"+worket.getAge()+":"+worket.getSalary());
        }
    }
}
